<!-- upload -->
<?=load_static('js/upload/uploadify.css','js/upload/jquery.uploadify-3.1.js')?>
<script>$(function(){ ad_obj.banner_mod_init(); })</script>
<div class="page-heading">
    <h3><?=$webmaster_config['title'];?></h3>
    <ul class="breadcrumb">
        <li><a href="<?=base_url()?>"><?=$webmaster_config['title'];?></a></li>
        <li>广告图管理系统</li>
    </ul>
</div>
<div class="wrapper">
    <div class="row">
        <div class="col-lg-12">
            <section class="panel">
                <header class="panel-heading"> 编辑信息</header>
                <div class="panel-body">
                    <form class="form-horizontal adminex-form" id="sign_in_form" method="post" >
                        <div class="form-group">
                            <label class="col-sm-2 control-label">广告图名称</label>
                            <div class="col-sm-8"><input type="text" name="page_name-mod" class="form-control required" title="请输入广告图名称" value="<?=$item['page_name']?>"></div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">数量(5张以内)</label>
                            <div class="col-sm-8"><input type="text" name="pic_count-mod" class="form-control required" title="请输入广告图数量" value="<?=$item['pic_count']?>"></div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">宽度</label>
                            <div class="col-sm-8"><input type="text" name="width-mod" class="form-control required" title="广告图宽度" value="<?=$item['width']?>"></div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">高度</label>
                            <div class="col-sm-8"><input type="text" name="height-mod" class="form-control required" title="广告图高度" value="<?=$item['height']?>"></div>
                        </div>
                        <?php if($aid){?>
                        <div class="form-group">
                            <label class="col-sm-2 col-sm-2 control-label">图片上传</label>
                            <div class="col-sm-8">
                                <div class="mul_upload_0"><input type="file" name="file_upload" id="file_upload" /></div>
                                <div class="notice">(允许上传<?=$item['pic_count']?>张图片)</div>	
                                <div class="mul_upload_1">
                                <?php
                                if($aid){
                                    for($i=0;$i<$item['pic_count'];$i++){
                                        if($item['picpath_'.$i]) {
                                ?>
                                <div class="mul_img_section">
                                    <div class="mul_img">
                                        <span class="info">	<img src="<?= $item['picpath_' . $i] ?>" width="150" alt=""/></span>
                                        <span class="mid"></span>
                                        <span class="btn btn-xs btn-danger del-img-btn" data-num="<?= $i ?>" data-id="<?= $aid ?>" data-action="/ad/banner_img_del/"><i class="fa fa-minus-circle"></i></span>
                                    </div>
                                    <input type="hidden" name="mul_upload[]" value="<?= $item['picpath_' . $i] ?>">
                                </div>
                                 <?php
                                            }
										}
									}
								?>
                                </div>
                            </div>
                        </div>	
                        <?php }?>	
                        <div class="form-group">
                            <div class="col-lg-offset-2 col-lg-10">
                                <input type="hidden" name="aid" value="<?=$aid?>">
                                <input type="hidden" name="action" value="<?=base_url('ad/banner_mod_action/')?>" />
                                <?php if($aid){?>
                                <input type="hidden" name="upload_num" value="<?=$item['pic_count']?>" />
                                <?php }?>
                                <input type="submit" class="btn btn-success" value="提交" />
                                <a href="<?=base_url('ad/banner_list/')?>" class="btn btn-success">返回</a>
                            </div>
                        </div>
                    </form>
                </div>
            </section>
        </div>
    </div>
</div>
